<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    {include file="layout:_meta" /}
    <title>详情</title>
</head>
<body>
<article class="cl pd-20">
    <form class="form form-horizontal" id="form-admin">

        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">申请规则</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea v-model="model.regtxt" id="" cols="80" rows="15"></textarea>

            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9   col-sm-offset-1 col-xs-offset-1  ">
            <input @click="storeRegText" type="button" value="提交" class="btn btn-primary radius">
        </div>
        </div>

    </form>
</article>

<!--_footer 作为公共模版分离出去-->
{include file="layout:_footer" /}
<!--/_footer 作为公共模版分离出去-->
<script type="text/javascript">

    var model = {
        covertemp:'',
        model: {
            regtxt:'',
        }
    };

    var store_model = new Vue({
        el: "#form-admin",
        data: model,
        methods: {
            // 保存 协议
            storeRegText(){
                console.log(store_model.model.regtxt);
                util.get("{:url('common/storeRegText')}", {
                    'content': store_model.model.regtxt,
                },function (data) {
                    // store_model.model = data.data;
                        console.log(data);
                    if (data.status*1 == 200) {
                        layer.msg(data.info);
                    } else {
                        layer.msg(data.info);
                    }
                });
            }
        }
    });
    util.get("{:url('common/getRegText')}", {},function (data) {
        store_model.model = data.data;
        console.log(data.data);
    });

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
